use crate::helpers::Bot;
use anyhow::{Context, Result};
use ::db::Db;
// use db::models::MatrixOrTelegramId;
use teloxide::prelude::*;
pub async fn start(bot: Bot, m: Message, db: Db) -> Result<()> {
    let telegram_user = m.from().context("NoneError")?;
    let user_id = telegram_user.id;
    // let user_username = telegram_user.username.clone();
    // let user_id = MatrixOrTelegramId::TelegramId { id: user_id, username: user_username };
        match db.find_user_tg(&user_id).await? {
            Some(_) => {}
        None => { db.create_user_tg(&user_id).await?; }
        }

    Ok(())
}

